package test.aop.assist;

import javassist.util.proxy.MethodHandler;

import java.lang.reflect.Method;

public class ProxyCheckWork implements MethodHandler {

    private Object target;

    public ProxyCheckWork(Object target) {
        this.target = target;
    }

    @Override
    public Object invoke(Object o, Method method, Method method1, Object[] args) throws Throwable {
        System.out.println("------校验-------");
        method.invoke(target, args);
        System.out.println("------记录-------");
        return null;
    }
}
